<template>
  <div>
    <h2>{{ msg }}</h2>
    <button @click="btnFn">逆转世界</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "爱你一万年",
    };
  },
  methods: {
    btnFn() {
      // ... ,reserve() 数组翻转
      // this.msg = [...this.msg].reverse().join("");
      // split()
      this.msg = this.msg.split("").reverse().join("");
    },
  },
};
</script>

<style></style>
